import axios from '@/libs/api.request'

/**
 *  发热记录接口
 */

// 发热温度统计
export const temperatureAlllist = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/temperatureAlllist',
    method: 'post',
    data: data
  })
}
/**
 *  统计接口
 */

// 重点地区来沈人员数量(全市总量)
export const findProvinceAllAreaList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findProvinceAllAreaList',
    method: 'get',
    data: data
  })
}
// 重点地区来沈人员数量(14天内每日数据)
export const findProvinceAllDateList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findProvinceAllDateList',
    method: 'post',
    data: data
  })
}
// 人员状态统计
export const getAllIllnessStateNum = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/getAllIllnessStateNum',
    method: 'get',
    data: data
  })
}
// 人员状态区统计
export const findAllIllnessStateNumAreaList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findAllIllnessStateNumAreaList',
    method: 'get',
    data: data
  })
}
// 区县总统计
export const sumAllList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/sumAllList',
    method: 'get',
    data: data
  })
}
// 疫情日统计
export const findAllIllnessStateNumDateList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findAllIllnessStateNumDateList',
    method: 'get',
    data: data
  })
}
// 区县日总统计
export const sumTodayList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/sumTodayList',
    method: 'get',
    data: data
  })
}
// 发热人数区统计
export const sumHotArea = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumHotArealist',
    method: 'get',
    data: data
  })
}
// 发热人数日统计
export const sumHotDaty = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumHotDatylist',
    method: 'get',
    data: data
  })
}
// 途经类型人数区统计
export const sumAddressTypeArea = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumAddressTypeArealist',
    method: 'get',
    data: data
  })
}
// 途经类型人数日统计
export const sumAddressTypeDate = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumAddressTypeDatelist',
    method: 'get',
    data: data
  })
}
// 密切接触人数区统计
export const findsumFollowArealist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumFollowArealist',
    method: 'get',
    data: data
  })
}
// 密切接触人数日统计
export const findsumFollowDatylist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumFollowDatylist',
    method: 'get',
    data: data
  })
}
// 各地来沈人员（省）
export const findFromProvinceList = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findFromProvinceList',
    method: 'get',
    data: data
  })
}
// 途经类型人数社区前十统计
export const findsumAddressTypeCommunitylist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findsumAddressTypeCommunitylist',
    method: 'get',
    data: data
  })
}
// 当天入出沈人员统计
export const getAllInOutTodayNum = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/getAllInOutTodayNum',
    method: 'get',
    data: data
  })
}
// 当日人员状态统计
export const getAllStateTodayNum = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/getAllStateTodayNum',
    method: 'get',
    data: data
  })
}
// 人员状态总统计
export const getAllStateNum = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/getAllStateNum',
    method: 'get',
    data: data
  })
}
// 城市农村人数区统计
export const findUserTypeArealist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findUserTypeArealist',
    method: 'get',
    data: data
  })
}
// 城市农村状态人数区统计
export const findUserTypeStateArealist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findUserTypeStateArealist',
    method: 'get',
    data: data
  })
}
// 出入沈人员人数区统计
export const findInStateArealist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findInStateArealist',
    method: 'get',
    data: data
  })
}
// 入沈人员人数省统计（14天内）（来源地）
export const findInStateProvincelist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findInStateProvincelist',
    method: 'get',
    data: data
  })
}
// 离沈人员人数省统计（14天内）
export const findOutStateProvincelist = (data) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/findOutStateProvincelist',
    method: 'get',
    data: data
  })
}

/**
 *  人员发热列表接口
 * @returns {Promise | Promise<unknown> | AxiosPromise}
 */
export const temperaturelist = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/temperaturelist',
    method: 'post',
    data: data
  })
}
export const userlist = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/userlist',
    method: 'post',
    data: data
  })
}
// 添加体温信息
export const createtemperature = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/createtemperature',
    method: 'post',
    data: data
  })
}
export function date0str (date, containtime) {
  if (!date || typeof date === 'string') {
    return date
  }
  var time1 = date.getFullYear()
  var month = date.getMonth() + 1
  var day = date.getDate()
  var hour = date.getHours()
  var min = date.getMinutes()
  var second = date.getSeconds()
  time1 += '-' + (month < 10 ? '0' + month : month)
  time1 += '-' + (day < 10 ? '0' + day : day)
  time1 += ' ' + (hour < 10 ? '0' + hour : hour)
  time1 += ':' + (min < 10 ? '0' + min : min)
  time1 += ':' + (second < 10 ? '0' + second : second)
  return time1
}
// 添加发热人员信息
export const createuserinfo = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/createuserinfo',
    method: 'post',
    data: data
  })
}
// 修改发热人员信息
export const updateuserinfo = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/updateuserinfo',
    method: 'post',
    data: data
  })
}
// 修改人员信息
export const updateuserinfoforadmin = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/updateuserinfoforadmin',
    method: 'post',
    data: data
  })
}
// 用户id查询人员基本信息
export const getuserinfo = (userid) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/userinfo',
    method: 'post',
    data: { id: userid }
  })
}
// 用户id查询人员基本信息app
export const userinfoByCardNo = (card_no) => {
  return axios.request({
    url: '/api/us/xgc/hatstate/userinfoByCardNo',
    method: 'post',
    data: { card_no: card_no }
  })
}
// 用户id删除人员基本信息
export const deleteUserInfo = (id) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/deleteUserInfo',
    method: 'post',
    data: { id: id }
  })
}
// 用户身份证号获取用户基本信息
export const getuserinfoApp = (userid) => {
  return axios.request({
    url: '/api/us/xgc/hatstateapp/userinfo',
    method: 'post',
    data: { id: userid }
  })
}
// 用户id删除人员信息
export const delbyid = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/deleteByid',
    method: 'post',
    data: data
  })
}
// 添加绑定信息(1同行人|2接触人)
export const createuserband = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/createuserband',
    method: 'post',
    data: data
  })
}
// 删除绑定信息(1同行人|2接触人)
export const delbanduser = (bandid) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/delbanduser',
    method: 'post',
    data: { id: bandid }
  })
}
// 更新绑定信息(1同行人|2接触人)
export const updatebanduser = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/updatebanduser',
    method: 'post',
    data: data
  })
}
// 查询绑定信息-分页接口(1同行人|2接触人)
export const banduserlist = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/banduserlist',
    method: 'post',
    data: data
  })
}
// 删除体温信息
export const deltemperature = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/deltemperature',
    method: 'post',
    data: data
  })
}
// 更新体温信息
export const updatetemperature = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/updatetemperature',
    method: 'post',
    data: data
  })
}
// 区，街道，社区级联接口
export const getMailLevelList = (data) => {
  return axios.request({
    url: '/api/as/xgc/auditmail/getMailLevelList',
    method: 'post',
    data: data
  })
}
// 人员信息迁出接口
export const updateusercompanycode = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/updateusercompanycode',
    method: 'post',
    data: data
  })
}
// 人员信息导出接口
export const findOutAllList = (data) => {
  return axios.request({
    // url: '/api/ac/xgc/HatStateService/findOutAllList',
    url: '/api/as/xgc/hatstate/gitRadisurl',
    method: 'post',
    data: data
  })
}
// 迁入人员列表接口
export const findInApplyList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findInApplyList',
    method: 'post',
    data: data
  })
}
// 迁出人员列表接口
export const findOutApplyList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findOutApplyList',
    method: 'post',
    data: data
  })
}
// 迁入同意
export const updateAgree = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/updateAgree',
    method: 'post',
    data: data
  })
}
// 迁入拒绝
export const updateDisAgree = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/updateDisAgree',
    method: 'post',
    data: data
  })
}
// 添加申请
export const createOutApplu = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/createOutApplu',
    method: 'post',
    data: data
  })
}
// 上级查看下级人员列表接口
export const userUpList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/userUpList',
    method: 'post',
    data: data
  })
}
// 迁出查询所有社区农村接口
export const getAllUserByMZList = (data) => {
  return axios.request({
    url: '/api/as/sc/office/getAllUserByMZList',
    method: 'post',
    data: data
  })
}
// 迁出查询所有社区农村接口
export const findNeedTemperatureUserList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findNeedTemperatureUserList',
    method: 'post',
    data: data
  })
}
// 迁出查询所有社区农村接口
export const findAllHospitalList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findAllHospitalList',
    method: 'post',
    data: data
  })
}
// 移动端上级查看下级列表接口
export const mobileUserUpList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstateapp/userUpList',
    method: 'post',
    data: data
  })
}
// 移动端编辑人员信息接口
export const updateuserinfoApp = (data) => {
  return axios.request({
    url: '/api/uc/xgc/HatStateService/updateuserinfoApp',
    method: 'post',
    data: data
  })
}
// 移动端编辑删除人员信息接口
export const delbyidforApp = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/deleteAppbyid',
    method: 'post',
    data: data
  })
}
// 移动端添加人员体温接口
export const createtemperatureforapp = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstateapp/createtemperature',
    method: 'post',
    data: data
  })
}
// 移动端编辑人员体温接口
export const updatetemperatureforapp = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstateapp/updatetemperature',
    method: 'post',
    data: data
  })
}
// 移动端删除人员体温接口
export const deltemperatureforapp = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstateapp/deltemperature',
    method: 'post',
    data: data
  })
}
// 移动端人员体温列表接口
export const temperaturelistforapp = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstateapp/temperaturelist',
    method: 'post',
    data: data
  })
}
// 移动端转移人员到PC端接口
export const updatesendAppToPC = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/updateSendAppToPC',
    method: 'post',
    data: data
  })
}
// 移动端来沈人员各区数据统计接口
export const getWDayList = (data) => {
  return axios.request({
    url: '/api/uc/xgc/HatStateService/getWDayList',
    method: 'post',
    data: data
  })
}
// 移动端来沈人员各区数据统计接口
export const getWPCDayList = (data) => {
  return axios.request({
    url: '/api/uc/xgc/HatStateService/getWPCDayList',
    method: 'post',
    data: data
  })
}
// 移动端来沈人员各区数据统计接口
export const saveAllCityToSel = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/saveAllCityToSel',
    method: 'post',
    data: data
  })
}
// PC端所有城市来沈人员各区数据统计接口
export const findAllCityList = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/findAllCityList',
    method: 'post',
    data: data
  })
}
// 手机端所有城市来沈人员各区数据统计接口
export const findAppAllCityList = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/findAppAllCityList',
    method: 'post',
    data: data
  })
}
// 查询已选城市名
export const fineAllCityToSelList = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/fineAllCityToSelList',
    method: 'post',
    data: data
  })
}
// 查询所有城市列表
export const findAllCity = (data) => {
  return axios.request({
    url: '/api/ac/sc/areaService/findAllCity',
    method: 'post',
    data: data
  })
}
// 外籍人员上级查看下级人员列表
export const userOutCountryUpList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/userOutCountryUpList',
    method: 'post',
    data: data
  })
}
// 外籍人员导出接口
export const userOutCountryToExcelUpList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/userOutCountryToExcelUpList',
    method: 'post',
    data: data
  })
}
// 字典表接口
export const getDictList = (data) => {
  return axios.request({
    url: '/api/as/sc/dict/getDictList',
    method: 'post',
    data: data
  })
}
export const findOlationList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findOlationList',
    method: 'post',
    data: data
  })
}
export const relieveIsolation = (data) => {
  return axios.request({
    url: '/api/ac/xgc/HatStateService/updateRelieveIsolation',
    method: 'post',
    data: data
  })
}
export const findOlationExcelList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findOlationExcelList',
    method: 'post',
    data: data
  })
}
export const findLogList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findLogList',
    method: 'post',
    data: data
  })
}
// 卫健列表
export const findOlationWJList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findOlationWJList',
    method: 'post',
    data: data
  })
}
export const findOlationWJExcelList = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/findOlationWJExcelList',
    method: 'post',
    data: data
  })
}
export const gitRadisurl = (data) => {
  return axios.request({
    url: '/api/as/xgc/hatstate/gitRadisurl',
    method: 'post',
    data: data
  })
}
export const mzMenulist = (data) => {
  return axios.request({
    url: '/api/ac/sc/menuService/mzMenulist?menu_id=' + data,
    method: 'get'
  })
}
